package utility;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Rect;

public class Chess {
	private Bitmap board;
	private int top;
	private int left;
	// kich thuoc ban co hien thi
	private int width;
	private int height;

	public Chess() {
		this.top = 0;
		this.left = 0;
		this.height = 0;
		this.width = 0;
	}

	public void Initialize(Bitmap bitmap) {
		this.board = bitmap;
	}

	public void draw(Canvas canvas) {
		Rect mdRect = new Rect(this.left, this.top, this.left
				+ this.getWidth(), this.top
				+ this.getHeight());
		canvas.drawBitmap(this.board, null, mdRect, null);
	}

	public int getTop() {
		return top;
	}

	public int getLeft() {
		return left;
	}

	public void setTop(int top) {
		this.top = top;
	}

	public void setLeft(int left) {
		this.left = left;
	}

	public int getWidth() {
		return width;
	}

	public int getHeight() {
		return height;
	}

	public void setWidth(int width) {
		this.width = width;
	}

	public void setHeight(int height) {
		this.height = height;
	}
}
